home *** CD-ROM | disk | FTP | other *** search
- Path: news.iag.net!news
- From: jatmon@iag.net (John R Buchan)
- Newsgroups: comp.lang.c,alt.msdos.programmer
- Subject: Re: Two strange C problems.
- Date: 9 Jan 1996 18:35:19 GMT
- Organization: Internet Access Group, Orlando, Florida
- Message-ID: <4cuch7$eod@news.iag.net>
- References: <4cojb2$qog@lugb.latrobe.edu.au> <4cqrom$a63@arcturus.ciril.fr>
- NNTP-Posting-Host: pm1-orl22.iag.net
- X-Newsreader: WinVN 0.99.7
-
- In article <4cqrom$a63@arcturus.ciril.fr>, gross says...
- >For your second problem when you write "carac=15" then chr(carac) is the
- ASCII
- >character of decimal value 15, ie the ASCII character 15. If you write
- >carac=\15, then chr(carac) is the ASCII character Hex(15), ie the ASCII
- >character 21.
- >
-
- Assuming carac is type char:
-
- carac = \15;
-
- is an "Illegal character '\' (0x5c)" error message on my BC3.1 set to ansi.
-
-
- carac = '\15'; /* Sets carac to 15(octal) == 13(dec) == 0D(hex) */
-
- carac = '\x15'; /* Sets carac to 15(hex) == 21(dec) == 25(octal) */
-
- carac = 15; /* Sets carac to 15(dec) == 0F(hex) == 17(octal) */
-
- --
- John R Buchan -:|:- Looking for that elusive FAQ? ftp to:
- jatmon@mail.iag.net -:|:- rtfm.mit.edu /pub/usenet-by-group/....
-
-